Extending Moby with Inheritance-Based Subtyping

نویسندگان

  • Kathleen Fisher
  • John H. Reppy
چکیده

There is a great divide between the study of the foundations of object-oriented languages and the practice of mainstream object-oriented languages like JAVA[AG98] and C++[Str97]. One of the most striking examples of this divide is the rôle that class inheritance plays in defining subtyping relations. In most foundational descriptions of OO languages, and in the language designs that these studies have informed, inheritance does not define any subtyping relation, whereas in languages like JAVA and C++, inheritance defines a subtyping hierarchy. What is interesting about this distinction is that there are certain idioms, such as friend functions and binary methods, that are natural to express in an inheritance-based subtyping framework, but which require substantial complication to handle in a structural subtyping framework.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Inheritance-Based Subtyping

Classes play a dual rôle in mainstream statically-typed object-oriented languages, serving as both object generators and object types. In such languages, inheritance implies subtyping. In contrast, the theoretical language community has viewed this linkage as a mistake and has focused on subtyping relationships determined by the structure of object types, without regard to their underlying impl...

متن کامل

Seventh International Workshop on Foundations of Object-Oriented Languages

The Seventh International Workshop on Foundations of Object-Oriented Languages (FOOL 7) was held on January 22, 2000, and it was colocated with the ACM Symposium on Principles of Programming Languages in Boston, Massachusetts, USA. Martı́n Abadi chaired the program committee, which received 19 submissions and accepted 6 of them. After the workshop, extended versions of 4 articles were solicited ...

متن کامل

Object-oriented aspects of MOBY

Typical class-based languages, such as C#, C++, and JAVA, provide complex class mechanisms but only weak module systems. These languages incorporate many of the features of rich module systems into their class constructs. In this paper, we describe an alternative approach. In our design, we rely on a rich ML-style module system to provide features such as visibility control and parameterization...

متن کامل

Subtyping and Inheritance for Categorical

We extend Hagino's categorical datatypes with subtyping and a limited form of inheritance. The view of objects as coalgebras provides the inspiration for subtyping and inheritance for coalgebraic (or coinductive) types. Exploiting the duality between coalgebras and algebras then yields notions of subtyping and inheritance for algebraic (or inductive) types.

متن کامل

Practical Strengthening of Preconditions

This paper takes a closer look at behavioral subtyping in the context of concurrency, by considering an example of subtyping of a concurrent datastructure taken from sensor networks. Akin to the extension of a state-machine, this example illustrates conflicts caused by the interference of concurrency and inheritance. In short, the extension consists in declaring additional fields in a subclass,...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2000